package com.abc.mapper;

import com.abc.entity.Jiaoshi;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface JiaoshiMapper {

    //新增教师
    @Insert("insert into jiaoshi(xingming,nianling,zhicheng) values(#{xingming},#{nianling},#{zhicheng})")
    int insertJiaoshi(Jiaoshi jiaoshi);
    //根据 xingming 查询单条记录
    @Select("select * from jiaoshi where xingming=#{xingming}")
    Jiaoshi findByJiaoshiXingming(String xingming);
    //查询所有的记录
    @Select("select * from jiaoshi")
    List<Jiaoshi> findAllJiaoshi();

}
